Make the grab breaking on window move work on Leopard (as well as Tiger)
authorRichard Hult <richard@imendio.com>
Sat, 3 Nov 2007 09:52:34 +0000 (09:52 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sat, 3 Nov 2007 09:52:34 +0000 (09:52 +0000)
2007-11-03  Richard Hult  <richard@imendio.com>

* gdk/quartz/GdkQuartzWindow.c:
* gdk/quartz/GdkQuartzWindow.h: Make the grab breaking on window
move work on Leopard (as well as Tiger) by ignoring which mouse
button is pressed.

svn path=/trunk/; revision=18964

ChangeLog
gdk/quartz/GdkQuartzWindow.c
gdk/quartz/GdkQuartzWindow.h

index 5ff8edf106be8d8152cbbdc25c72f25f41db773f..dc2785b554b22d2029e023fadb315e36362f09a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-03  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/GdkQuartzWindow.c:
+       * gdk/quartz/GdkQuartzWindow.h: Make the grab breaking on window
+       move work on Leopard (as well as Tiger) by ignoring which mouse
+       button is pressed.
+
 2007-11-03  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
index 7200035a5f1e10786c3b8aea9686830380ceec4d..220531604f40d6520bc88dcf64d8fcc674cc2b8e 100644 (file)
  */
 -(void)windowWillMove:(NSNotification *)aNotification
 {
-  if (leftDown)
-    inMove = YES;
+  inMove = YES;
 }
 
 -(void)sendEvent:(NSEvent *)event
 {
   switch ([event type])
     {
-    case NSLeftMouseDown:
-      leftDown = YES;
-      break;
-
     case NSLeftMouseUp:
-      leftDown = NO;
-      inMove = NO;
       inManualMove = NO;
       inManualResize = NO;
+      inMove = NO;
       break;
 
     case NSLeftMouseDragged:
   GdkEvent *event;
 
   private->x = content_rect.origin.x;
-  private->y = _gdk_quartz_window_get_inverted_screen_y (content_rect.origin.y) - impl->height;
+  private->y = _gdk_quartz_window_get_inverted_screen_y (content_rect.origin.y + content_rect.size.height);
 
   /* Synthesize a configure event */
   event = gdk_event_new (GDK_CONFIGURE);
index f081908fd45eb183abe76b0c72974b28fc16e01f..14c4d5a7aa99d4605f0ea2b86180dbe74c7e3043 100644 (file)
@@ -23,7 +23,6 @@
 #include <glib.h>
 
 @interface GdkQuartzWindow : NSWindow {
-  BOOL leftDown;
   BOOL inMove;
 
   /* Manually triggered move/resize (not by the window manager) */